﻿@using Smartstore.Core.Web

@model IUserAgent

@{
    ViewBag.Title = "User Agent Tester";
    var ua = Model;
}

<div class="section-header">
    <div class="title">
        <i class="fa fa-mobile-alt"></i>
        <span>User Agent Tester</span>
    </div>
</div>

<div style="max-width: 800px">
    <form method="get">
        <div>
            <textarea name="ua" id="ua" class="form-control">@ua.RawValue</textarea>
            <button type="submit" class="btn btn-secondary mt-3">Test</button>
        </div>

        <div class="mt-4">
            OS: <strong>@ua.OS.Family</strong> (@ua.OS)<br />
            User Agent: <strong>@ua.UserAgent.Family</strong>, (@ua.UserAgent)<br />
            Device: <strong>@ua.Device.Family</strong>, (@ua.Device)<br />
            <br />
            IsBot: <span style='font-weight:@(ua.IsBot ? "bold" : "normal")'>@ua.IsBot</span><br />
            IsMobileDevice: <span style='font-weight:@(ua.IsMobileDevice ? "bold" : "normal")'>@ua.IsMobileDevice</span><br />
            IsTablet: <span style='font-weight:@(ua.IsTablet ? "bold" : "normal")'>@ua.IsTablet</span><br />
            IsPdfConverter: <span style='font-weight:@(ua.IsPdfConverter ? "bold" : "normal")'>@ua.IsPdfConverter</span><br />
        </div>
    </form>
</div>





